import Layout from '@/layout'

const createResultRouter = {
  path: '/createResult',
  component: Layout,

  redirect: '/createResult/index',
  meta: {
    title: '创作成果',
    icon: 'createResult'
  },

  children: [{
      path: '/createResult/index',
      name: 'createResult',
      component: () => import('@/page/CreateResult/index'),
      props: true,
      meta: {
        title: '创作成果',
        needBreadcrumb: false
      }
      // hidden:true,
    },

    {
      path: 'uploadLessonPlan',
      name: 'uploadLessonPlan',
      component: () => import('@/page/CreateResult/uploadLessonPlan/index'),
      props: route => ({
        id: route.query.id,
        typeRole: 'TEACHER'
      }),
      hidden: true,
      meta: {
        title: '上传教案',
        needBreadcrumb: '上传教案'
      }
    },
    {
      path: 'uploadLessonPlanDetails/:id',
      name: 'uploadLessonPlanDetails',
      component: () => import('@/page/CreateResult/uploadLessonPlanDetails/index'),
      hidden: true,
      props: true,
      meta: {
        title: '上传教案',
        needBreadcrumb: '上传教案'
      }
    },
    {
      path: 'uploadLessonPlanTrainer',
      name: 'uploadLessonPlanTrainer',
      component: () => import('@/page/CreateResult/uploadLessonPlan/index'),
      meta: {
        title: '培训师上传教案',
        needBreadcrumb: '培训师上传教案'
      },
      props: route => ({
        id: route.query.id,
        typeRole: 'TRAINER'
      }),
      hidden: true
    },

    {
      path: 'uploadResearchReport',
      name: 'uploadResearchReport',
      component: () => import('@/page/CreateResult/uploadResearchReport/index'),
      hidden: true,
      meta: {
        title: '上传教研报告',
        needBreadcrumb: '上传教研报告'
      }
      // hidden:true,
    },
    {
      path: 'teachDesignDetails',
      name: 'teachDesignDetails',
      component: () => import('@/page/CreateResult/teachDesignDetails'),
      hidden: true,
      meta: {
        title: '教学设计详情',
        needBreadcrumb: true
      },
      props: route => ({
        id: route.query.designId
      })
      // hidden:true,
    },

    {
      path: '/uploadResearchReport/reportDetail',
      name: 'teachReportDetail',
      component: () => import('@/page/CreateResult/uploadResearchReport/reportDetail'),
      hidden: true,
      meta: {
        title: '教研报告详情',
        needBreadcrumb: '教研报告详情'
      }
      // hidden:true,
    }
  ]
}

export default createResultRouter
